package com.ruoyi.quartz.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quartz.mapper.YjgCgMainMapper;
import com.ruoyi.quartz.domain.YjgCgMain;
import com.ruoyi.quartz.service.IYjgCgMainService;

/**
 * YjgCgMainService业务层处理
 * 
 * @author SYF
 * @date 2025-05-07
 */
@Service
public class YjgCgMainServiceImpl implements IYjgCgMainService 
{
    @Autowired
    private YjgCgMainMapper yjgCgMainMapper;

    /**
     * 查询YjgCgMain
     * 
     * @param consigntime YjgCgMain主键
     * @return YjgCgMain
     */
    @Override
    public YjgCgMain selectYjgCgMainByConsigntime(String consigntime)
    {
        return yjgCgMainMapper.selectYjgCgMainByConsigntime(consigntime);
    }

    /**
     * 查询YjgCgMain列表
     * 
     * @param yjgCgMain YjgCgMain
     * @return YjgCgMain
     */
    @Override
    public List<YjgCgMain> selectYjgCgMainList(YjgCgMain yjgCgMain)
    {
        return yjgCgMainMapper.selectYjgCgMainList(yjgCgMain);
    }

    /**
     * 新增YjgCgMain
     * 
     * @param yjgCgMain YjgCgMain
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertYjgCgMain(YjgCgMain yjgCgMain) {
        return yjgCgMainMapper.insertYjgCgMain(yjgCgMain);
    }

    /**
     * 修改YjgCgMain
     * 
     * @param yjgCgMain YjgCgMain
     * @return 结果
     */
    @Override
    public int updateYjgCgMain(YjgCgMain yjgCgMain)
    {
        return yjgCgMainMapper.updateYjgCgMain(yjgCgMain);
    }

    /**
     * 批量删除YjgCgMain
     * 
     * @param consigntimes 需要删除的YjgCgMain主键
     * @return 结果
     */
    @Override
    public int deleteYjgCgMainByConsigntimes(String[] consigntimes)
    {
        return yjgCgMainMapper.deleteYjgCgMainByConsigntimes(consigntimes);
    }

    /**
     * 删除YjgCgMain信息
     * 
     * @param consigntime YjgCgMain主键
     * @return 结果
     */
    @Override
    public int deleteYjgCgMainByConsigntime(String consigntime)
    {
        return yjgCgMainMapper.deleteYjgCgMainByConsigntime(consigntime);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygDim(){
        return yjgCgMainMapper.selectJygDim();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygDimKc(){
        return yjgCgMainMapper.selectJygDimKc();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygDimInfo(String year){
        return yjgCgMainMapper.selectJygDimInfo(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygCgData(){
        return yjgCgMainMapper.selectJygCgData();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteDataByYear(String year){
        return yjgCgMainMapper.deleteDataByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteCgImportYjgMainByYear(String year){
        return yjgCgMainMapper.deleteCgImportYjgMainByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygXsData(String year){
        return yjgCgMainMapper.selectJygXsData(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygCgMainData(){
        return yjgCgMainMapper.selectJygCgMainData();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectJygDqkcData(){
        return yjgCgMainMapper.selectJygDqkcData();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectYjgCgMainData(String year){
        return yjgCgMainMapper.selectYjgCgMainData(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCgYjgMainData(String year){
        return yjgCgMainMapper.selectCgYjgMainData(year);
    }
}
